package cn.zhaozhiqi.controller.app;

import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaIgnore;
import cn.zhaozhiqi.pojo.app.dto.AppLoginDto;
import cn.zhaozhiqi.pojo.domain.Login;
import cn.zhaozhiqi.pojo.query.PageQueryWrapper;
import cn.zhaozhiqi.result.JSONResult;
import cn.zhaozhiqi.result.PageResult;
import cn.zhaozhiqi.service.ILoginService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@Tag(name = "app统一登录",description = "app统一登录")
@RestController
@RequestMapping("/app/uaa")
public class AppLoginController {

    @Autowired
    public ILoginService loginService;

    @Operation( summary= "app统一登录",description = "app统一登录接口")
    @Parameter(name = "dto",description = "登录参数对象",required = true)
    @PostMapping("/applogin")
    @SaIgnore
    public JSONResult applogin(@RequestBody @Valid AppLoginDto dto){
        return JSONResult.success(loginService.applogin(dto));
    }



}
